import React, { Component } from 'react'
import SwpropType from 'prop-types'
export default class Narbar extends Component {
    //类属性  传过来的值的验证
    static propTypes = {
        show: SwpropType.bool,
        title: SwpropType.string
    }
    //默认值
    static defaultProps = {
        show: true,
        title: '我是默认那种'
    }
    render() {

        return (
            <div>
                <div>我是传进来的参数：{this.props.title}</div>
                <span>{this.props.show ? 'zhen' : 'fu'}</span>
            </div>
        )
    }
}
